package Homes;

import java.util.HashSet;

import Categorias.Categoria;

public class CategoriasHome {
	
	private HashSet<Categoria> categorias;
	
	private static CategoriasHome instance = null;
	
	private CategoriasHome(){
		this.categorias = new HashSet<Categoria>();
	}
	
	public static void reset(){
		instance = null;
	}
	
	public static synchronized CategoriasHome getInstance(){
		if (instance == null)
			instance = new CategoriasHome();
		return instance;
	}
	
	public void addCategoria(Categoria categoria){
		this.categorias.add(categoria);
	}
	
	public HashSet<Categoria> getAll(){
		return this.categorias;
	}
}
